<template>
  <div id="app">
    <com-loading v-if="ShowLoading"></com-loading>
    <router-view></router-view>
  </div>
</template>

<script>

 import Loading from '@/components/loading'
export default {
   data: function() {
            return {
               
            }
        },
        created: function() {
           if (this.$route.name === undefined) {
                this.$router.push('/index')
            }
        },
        watch: {
            
        },
        computed: {
            ShowLoading:function() {               
            return this.$store.getters.getLoading.isShow
            },
            title:function(){   
            return this.$store.getters.getLoading.title;
            },
           

        },
        components: {
            
             comLoading:Loading,
           
           
        },
        methods: {}
}
</script>

<style>
*{
  margin:0px;
  padding: 0px;

}
html,
body{
  height: 100%;
  background: #f2f2f2;
  background-color: #f2f2f2;
}
@media screen and (min-width:0px) and (max-width: 800px) {
  #app {
   width: 100%;
   margin: 0px auto;
   height: 100%;
   background: #f2f2f2;
   
}
}
@media screen and (min-width:800px) and (max-width: 10000px) {
  #app {
   width: 1240px;
   margin: 0px auto;
   height: 100%;
   background: #f2f2f2;
   
}
}

</style>
